package com.example.design.函数式编程.a函数对象化;

import java.util.stream.Stream;

public class Sample03 {

    public static void main(String[] args) {
        /**
         * 晒出所有男学生
         */
        Stream.of(
                new Sample01.Student("zhang", "男",1),
                new Sample01.Student("li", "女",11),
                new Sample01.Student("liu", "男",13)
        ).filter(Sample01.Student::isMale).forEach(Sample01.Student::print);




    }


}
